import type { FormField } from '../form'

const fieldTipMap = new Map<any, string>([
  ['ElInput', '请输入'],
  ['ElInputNumber', '请输入'],
  ['ElSelect', '请选择'],
  ['MSelect', '请选择'],
  ['MTreeSelect', '请选择'],
  ['ElDatePicker', '请选择'],
  ['MSelectParams', '请选择']
])

export const getFieldTip = (field: FormField) => {
  return fieldTipMap.get(field.tag) ?? `请填写${field.label ?? field.key}`
}
